import { Button } from 'ant-design-vue'
import { defineComponent, ref } from 'vue'
import MediaList from './mediaList'
import MediaEditor from './mediaEditor'
import { useRecorderProvide } from '@/hooks/recorder'
import { useImageProvide } from '@/hooks/image'

export default defineComponent({
  name: 'MediaRecorder',
  setup() {
    // const mediaStatus = ref(false); //开启视频录制状态
    /**录制和画板hooks */
    const store = useRecorderProvide()
    useImageProvide()
    const setMediaStatus = (status: boolean) => {
      store.state.mediaStatus = status
    }
    return () => (
      <div class="w-full bg-white relative ">
        <MediaEditor></MediaEditor>
      </div>
    )
  },
})
